home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1469 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.2 KB

  1. Path: oxy.rust.net!usenet
  2. From: ebennett@rust.net
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Help on C++ error
  5. Date: Thu, 11 Jan 1996 05:15:47 GMT
  6. Organization: Rust Net - High Speed Internet in Detroit  810-642-2276
  7. Message-ID: <4d1rqc$sla@oxy.rust.net>
  8. References: <96010.112507APCCU@CUNYVM.CUNY.EDU>
  9. NNTP-Posting-Host: liv-16.rust.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. Paul Abrilla <APCCU@CUNYVM.CUNY.EDU> wrote:
  13.  
  14. >Hi to all,
  15. >I'm just starting to code on C++, and was playing around with classes and
  16. >came across an error and a warning when I try to compile the code below.
  17. >The warning is complaining about the statement, 'int Cat::SetAge(age)'.
  18. >It says, 'Style of function definition is now obsolete'.  I'm sorry I couldn't
  19. >check my compiler's manual at this time.  On the other hand, the error says,
  20. >'Cat::SetAge(int)' is not a member of 'Cat' (line:19).  Any help will be
  21. >appreciated.  Please send replies directly tp my account.  Thanks in advance.
  22. > Stuff Deleted....
  23. >
  24. >int Cat::SetAge(age)
  25. >{
  26. >  itsAge = age;
  27. >}
  28.  
  29. Change this to:
  30.  
  31.   int Cat::SetAge(int age)
  32.   {
  33.      itsAge = age;
  34.   }
  35.  
  36. The style of declaring a parameter without its type is obsolete.
  37.  
  38. Earl Bennett
  39.  
  40.  
  41.